package tournamentTree;

public class TreeIdGenerator {
	private int id;
	private static TreeIdGenerator instance = null;

	private TreeIdGenerator() {
		this.id = -1;
	}

	public static TreeIdGenerator getInstance() {
		if (instance == null) {
			instance = new TreeIdGenerator();
		}
		return instance;
	}

	public int getNextID() {
		this.id++;
		return this.id;
	}

	public void reset() {
		this.id = -1;
	}
}
